<?php /* Smarty version Smarty3-RC3, created on 2013-10-10 10:02:40
         compiled from ".\templates\bullionDetail.tpl" */ ?>
<?php /*%%SmartyHeaderCode:767252567b40e1fed5-54469243%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '8f179813f3b7f12d44c30fbc8cb806a65779994d' => 
    array (
      0 => '.\\templates\\bullionDetail.tpl',
      1 => 1381399359,
    ),
  ),
  'nocache_hash' => '767252567b40e1fed5-54469243',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_html_options')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_options.php';
if (!is_callable('smarty_function_html_select_date')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_select_date.php';
if (!is_callable('smarty_modifier_string_format')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\modifier.string_format.php';
if (!is_callable('smarty_modifier_date_format')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\modifier.date_format.php';
?><?php if ($_GET['print']!=1){?>
  <?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }else{ ?>
  <?php $_template = new Smarty_Internal_Template("headerPrint.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }?>
<script type="text/javascript">
function deleteRow(bulliondetailid)
{
  if(confirm("Warning: Are you sure?\nDeletion is permanent. Continue anyway.") && confirm("Warning: Are you sure?\nDeletion is permanent. Continue anyway."))
  {
    location.href = "bullionDelete.php?bulliondetailid="+bulliondetailid;
  }
}
</script>
<script type="text/javascript">
function bookFunction(id)
{
  document.form1.bdate.value="1";
  document.form1.submit();
}
</script>
<form name="form1" action="" method="post">
<input type="hidden" name="bdate" id="bdate" value="0" />
<center><h4><?php echo $_smarty_tpl->getVariable('l_bullionDetail')->value;?>
</h4></center>
<div class="contentDiv">
  <table border="1" align="center" width="98%" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="4" class="table1">
      <?php echo $_smarty_tpl->getVariable('l_partySelect')->value;?>
 : 
      <select name="party"  onchange="bookFunction()">
        <?php ob_start();?><?php echo $_smarty_tpl->getVariable('partyId')->value;?>
<?php $_tmp1=ob_get_clean();?><?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('party')->value['partyId'],'output'=>$_smarty_tpl->getVariable('party')->value['bullionPartyName'],'selected'=>$_tmp1),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select>
    </td>
    <td colspan="3" class="table1" nowrap>
      <?php echo $_smarty_tpl->getVariable('l_from')->value;?>
 : 
      <?php echo smarty_function_html_select_date(array('prefix'=>"fromDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'time'=>$_smarty_tpl->getVariable('fromDateSelected')->value,'day_value_format'=>"%02d"),$_smarty_tpl->smarty,$_smarty_tpl);?>

      <?php echo $_smarty_tpl->getVariable('l_to')->value;?>
 
      <?php echo smarty_function_html_select_date(array('prefix'=>"toDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'time'=>$_smarty_tpl->getVariable('toDate')->value,'day_value_format'=>"%02d"),$_smarty_tpl->smarty,$_smarty_tpl);?>

    </td>
    <td class="table1"><input type="submit" name="submitBtn" value="<?php echo $_smarty_tpl->getVariable('l_find')->value;?>
" /></td>
    <?php if ($_GET['print']!=1){?>
      <td class="table1"><a href="bullionDetail.php?print=1&fromDate=<?php echo $_smarty_tpl->getVariable('fromDate')->value;?>
&toDate=<?php echo $_smarty_tpl->getVariable('toDate')->value;?>
&party=<?php echo $_smarty_tpl->getVariable('partyId')->value;?>
"><?php echo $_smarty_tpl->getVariable('l_bullionPrint')->value;?>
</a></td>
    <?php }else{ ?>
    <?php }?>
  </tr>
  <tr class="table1">
    <th width="8%">&nbsp;</th>
    <th align="center" width="8%">Date</th>
    <th align="center" width="24%"><?php echo $_smarty_tpl->getVariable('l_particulars')->value;?>
</th>
    <th align="right" width="12%"><?php echo $_smarty_tpl->getVariable('l_kg')->value;?>
</th>
    <th align="right" width="12%"><?php echo $_smarty_tpl->getVariable('l_bhav')->value;?>
</th>
    <th align="right" width="12%"><?php echo $_smarty_tpl->getVariable('l_cramount')->value;?>
</th>
    <th align="right" width="12%"><?php echo $_smarty_tpl->getVariable('l_crfine')->value;?>
</th>
    <th align="right" width="12%" colspan="2"><?php echo $_smarty_tpl->getVariable('l_dramount')->value;?>
</th>
  </tr>
  <tr class="table2">
    <td>&nbsp;</td>
    <td align="right"><?php echo $_smarty_tpl->getVariable('opening')->value['particulars'];?>
</td>
    <td align="right" style="color:green;"><?php if ($_smarty_tpl->getVariable('opening')->value['kg']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('opening')->value['kg'],"%.0f");?>
<?php }?></td>
    <td align="right"><?php if ($_smarty_tpl->getVariable('opening')->value['bhav']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('opening')->value['bhav'],"%.2f");?>
<?php }?></td>
    <td align="right"><?php if ($_smarty_tpl->getVariable('opening')->value['cramount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('opening')->value['cramount'],"%.0f");?>
<?php }?></td>
    <td align="right"><?php if ($_smarty_tpl->getVariable('opening')->value['crfine']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('opening')->value['crfine'],"%.0f");?>
<?php }?></td>
    <td align="right"><?php if ($_smarty_tpl->getVariable('opening')->value['dramount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('opening')->value['dramount'],"%.0f");?>
<?php }?></td>
    <td align="right" colspan="2"><?php if ($_smarty_tpl->getVariable('opening')->value['totalAmt']){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('opening')->value['totalAmt'],"%..0f");?>
<?php }?></td>
  </tr>
  <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['name'] = "sec";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'] = is_array($_loop=$_smarty_tpl->getVariable('bullionDetail')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total']);
?>
  <tr class="table2">
    <td>
      <?php if ($_GET['print']!=1){?>
      <?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bullionmasterid']!=$_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']-1]['bullionmasterid']){?><a href="bullionDetailList.php?print=1&bullionmasterid=<?php echo $_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bullionmasterid'];?>
&partyId=<?php echo $_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyId'];?>
&bulliondate=<?php echo $_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bulliondate'];?>
">Print</a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
      <?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bullionmasterid']!=$_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']-1]['bullionmasterid']){?><a href="javascript:deleteRow(<?php echo $_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bulliondetailid'];?>
)"><img src="./images/b_drop.png" border="0" width="15" height="15"></a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
      <?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bullionmasterid']!=$_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']-1]['bullionmasterid']){?><a href="bullionEntry.php?bullionmasterid=<?php echo $_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bullionmasterid'];?>
"><img src="./images/b_edit.png" border="0" width="15" height="15"></a><?php }else{ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?>
      <?php }else{ ?>
        &nbsp;
      <?php }?>
    </td>
    <td align="center" style="border-right:1px;" NOWRAP><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bulliondate'],"%d-%m-%Y");?>
</td>
    <td align="left" style="border-right:1px;" NOWRAP>&nbsp;&nbsp;<?php echo $_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['particulars'];?>
</td>
    <td align="right" style="border-right:1px; color:green;"><?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['kg']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['kg'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
    <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bhav']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['bhav'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
    <td align="right" style="border-right:1px; color:red;"><?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['cramount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['cramount'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
    <td align="right" style="border-right:1px; color:red;"><?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['crfine']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['crfine'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
    <td align="right" style="border-right:1px; color:green;" colspan="2"><?php if ($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['dramount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('bullionDetail')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['dramount'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
  </tr>
  <?php endfor; endif; ?>
  <tr>
    <td colspan="10"><hr COLOR="#000000" /></td>
  </tr>
  <tr class="table1">
     <th>&nbsp;</th>
      <th align="right">Total&nbsp;&nbsp;&nbsp;</th>
      <th>&nbsp;</th>
      <th align="right" style="color:green;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['kg'],"%.0f");?>
</th>
      <th>&nbsp;</th>
      <th align="right" style="color:red;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['cramount'],"%.0f");?>
</th>
      <th align="right" style="color:red;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['crfine'],"%.0f");?>
</th>
      <th align="right" style="color:green;" colspan="2"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['dramount'],"%.0f");?>
</th>
  </tr>
   <tr>
    <td colspan="11"><b style="color:green;"><?php if ($_smarty_tpl->getVariable('total')->value['netfine']>=0){?> Total Debit Fine:<?php }else{ ?></b><b style="color:red;"> Total Credit Fine:<?php }?> <?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['netfine'],"%.0f");?>
</b></td>
  </tr>
  <tr>
    <td colspan="11"><b style="color:green;"><?php if ($_smarty_tpl->getVariable('total')->value['netamount']>=0){?> Total Debit Amount:<?php }else{ ?></b><b style="color:red;"> Total Credit Amount:<?php }?> <?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['netamount'],"%.0f");?>
</b></td>
  </tr>
  </table>
</div>
</form>
<?php if ($_GET['print']!=1){?>
  <?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }?>